<template>
	<web-view :src="src"></web-view>
</template>

<script>
	import CONFIG from '../../utils/config.js';
	import request from '../../utils/request.js';
	export default {
		data() {
			return {
				// src: `${CONFIG.DOMAIN}/h5/index`,
				src: `${CONFIG.DOMAIN}/h5/index?t=${new Date().getTime()}`,
				title: '夜鱼快宿'
			}
		},
		onLoad(options) {
			
			const {
				redirect = '',
			} = options;
			
			uni.showLoading({
				title: '加载中...',
			})
			
			setTimeout(function() {
				uni.hideLoading();
			}, 2000);
			
			
			if (redirect) {
				const route = decodeURIComponent(redirect);
				this.src = `${CONFIG.DOMAIN}/h5${route}`;
			}
			
			uni.showShareMenu({
				withShareTicket: true,
			});
			
			
		},
		
		onShareAppMessage(res) {
			return {
				title: '国内领先快捷式C2B住宿反向预订平台',
				path: '/pages/index/index?redirect=/index',
				imageUrl: 'https://yeyu-kuaisu.oss-cn-hangzhou.aliyuncs.com/Public/guide.png',
			}
		},
		
		methods: {
			onDownload () {
				uni.navigateTo({
					url: '/pages/download/download',
					success: res => {},
					fail: () => {},
					complete: () => {}
				});
			}
		},
	}
</script>

<style>

</style>
